feat: allow user to pass multiple files to fix and check commands#119
feat: allow user to pass multiple files to fix and check commands#119sinrohit-desco wants to merge 1 commit intooppiliappan:masterfrom
fix and check commands#119Conversation
|
I think we should have this. How about a test though? |
Yeah, definitely but before that I want to rework the changes as the program needs to respect each |
a6a2b27 to
70a4c18
Compare
|
I completely implemented the iterator using Walk from ignore crate. Let me know your thoughts @TLATER @mightyiam |
There was a problem hiding this comment.
Looks really good, much better than the existing code! Error handling might need some work though.
To be clear, since apparently this is less common parlance than I thought, "nit" means a small thing that I don't really think needs to be addressed but point out anyway because I'm overly specific about programming. So feel free to ignore those comments if what they're talking about doesn't also annoy you.
|
|
||
| use clap::Parser; | ||
| use lib::{LINTS, session::Version}; | ||
| use lib::{session::Version, LINTS}; |
There was a problem hiding this comment.
Nit: Spurious diff changes, it'd be best to revert that just for a clean commit history. Is this done by rustfmt? I didn't think import ordering is unstable?
Might as well squash the commits while you're at it.
There was a problem hiding this comment.
This is happening because of pre-commit hook that runs when I try to commit.
There was a problem hiding this comment.
Pre-commit hooks run locally, you could disable it. But fair enough, guess there's a pre-commit hook but it didn't exist when this file was originally written. It's a nit for a reason, solve or don't as you see fit; personally I'd probably put this in a separate commit, but I sometimes take commit hygiene too far.
There was a problem hiding this comment.
Yeah, I will leave it up for the maintainer on how to proceed.
70a4c18 to
4c856de
Compare
TLATER
left a comment
There was a problem hiding this comment.
LGTM, no further comments :) I'd love to resolve my earlier ones, sadly I don't have permissions to do that.
|
Sorry, I think #138 is the priority so we've been working on that. |
|
Hey, #138 is complete. Sorry for the conflicts. Looking forward to reviewing this again. |
4c856de to
6e21d85
Compare
Hi Shahar! I have rebased the PR and resolved the conflicts. |
mightyiam
left a comment
There was a problem hiding this comment.
Should this new feature include a test?
| }; | ||
|
|
||
| use crate::{LintMap, dirs, err::ConfigErr, utils}; | ||
| use crate::{dirs, err::ConfigErr, utils, LintMap}; |
|
I was just testing this out, but it's not compiling correctly. |
|
Apologies for leaving it unattended for this long.
That's the clippy warning (error). I ran cargo build and didn't run clippy checks. Let me fix that and also rebase. |
reimplement the iterator using ignore::Walk This implementation simplifies things a bit also it returns a lazy iterator which is memory efficient for large codebases.
|
Thank you for resuming. But, would you mind submitting against https://github.com/molybdenumsoftware/statix ? |
Sure thing!! |
|
Closing in favour of molybdenumsoftware#1921
|
Resolves #118